package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Objects;

/**
 * 审批表
 */
@Entity
@Table(name = "cucheck", schema = "springboot", catalog = "")
public class Cucheck {
    private int apprId;        	    //审批id
    private Integer apprIds;        //需要审批的id
    private String apprTitle;	    //审批类型
    private String apprReason;      //审批是由
    private String apprView;		//审批意见
    private Timestamp apprDate;	    //申请时间
    private Integer apprPeople;	    //申请人
    private Emp empByEmployeesId;   //审批人
    private Integer apprComplete;   //审批是否完成
    private Integer apprDelete;     //被审批数据是否被删除
    private CucheckType cucheckTypeByCutId;

    @Id
    @Column(name = "appr_id")
    public int getApprId() {
        return apprId;
    }

    public void setApprId(int apprId) {
        this.apprId = apprId;
    }

    @Basic
    @Column(name = "appr_ids")
    public Integer getApprIds() {
        return apprIds;
    }

    public void setApprIds(Integer apprIds) {
        this.apprIds = apprIds;
    }

    @Basic
    @Column(name = "appr_title")
    public String getApprTitle() {
        return apprTitle;
    }

    public void setApprTitle(String apprTitle) {
        this.apprTitle = apprTitle;
    }

    @Basic
    @Column(name = "appr_reason")
    public String getApprReason() {
        return apprReason;
    }

    public void setApprReason(String apprReason) {
        this.apprReason = apprReason;
    }

    @Basic
    @Column(name = "appr_view")
    public String getApprView() {
        return apprView;
    }

    public void setApprView(String apprView) {
        this.apprView = apprView;
    }

    @Basic
    @Column(name = "appr_date")
    public Timestamp getApprDate() {
        return apprDate;
    }

    public void setApprDate(Timestamp apprDate) {
        this.apprDate = apprDate;
    }

    @Basic
    @Column(name = "appr_people")
    public Integer getApprPeople() {
        return apprPeople;
    }

    public void setApprPeople(Integer apprPeople) {
        this.apprPeople = apprPeople;
    }

    @Basic
    @Column(name = "appr_complete")
    public Integer getApprComplete() {
        return apprComplete;
    }

    public void setApprComplete(Integer apprComplete) {
        this.apprComplete = apprComplete;
    }

    @Basic
    @Column(name = "appr_delete")
    public Integer getApprDelete() {
        return apprDelete;
    }

    public void setApprDelete(Integer apprDelete) {
        this.apprDelete = apprDelete;
    }

    @ManyToOne
    @JoinColumn(name = "cut_id", referencedColumnName = "cut_id")
    public CucheckType getCucheckTypeByCutId() {
        return cucheckTypeByCutId;
    }

    public void setCucheckTypeByCutId(CucheckType cucheckTypeByCutId) {
        this.cucheckTypeByCutId = cucheckTypeByCutId;
    }

    @ManyToOne
    @JoinColumn(name = "employees_id", referencedColumnName = "employees_id")
    public Emp getEmpByEmployeesId() {
        return empByEmployeesId;
    }

    public void setEmpByEmployeesId(Emp empByEmployeesId) {
        this.empByEmployeesId = empByEmployeesId;
    }

    @Override
    public String toString() {
        return "Cucheck{" +
                "apprId=" + apprId +
                ", apprIds=" + apprIds +
                ", apprTitle='" + apprTitle + '\'' +
                ", apprReason='" + apprReason + '\'' +
                ", apprView='" + apprView + '\'' +
                ", apprDate=" + apprDate +
                ", apprPeople=" + apprPeople +
                ", empByEmployeesId=" + empByEmployeesId +
                ", cucheckTypeByCutId=" + cucheckTypeByCutId +
                '}';
    }
}
